package ca.newcommerce.youtube.data
{
    import ca.newcommerce.youtube.iterators.*;

    public class MediaGroupData extends AbstractData
    {
        protected var _data:Object;

        public function MediaGroupData(param1:Object)
        {
            this._data = param1;
            return;
        }// end function

        public function get keywords() : Array
        {
            var _loc_1:* = this._data.media$keywords;
            return _loc_1.split(", ");
        }// end function

        public function get duration() : Number
        {
            return parseInt(this._data.yt$duration.seconds);
        }// end function

        public function get thumbnails() : ThumbnailIterator
        {
            return new ThumbnailIterator(this._data.media$thumbnail);
        }// end function

        public function get title() : String
        {
            return this._data.media$title.$t;
        }// end function

        public function get contents() : MediaContentIterator
        {
            return new MediaContentIterator(this._data.media$content);
        }// end function

        public function get categories() : CategoryIterator
        {
            return new CategoryIterator(this._data.media$category);
        }// end function

        public function get description() : String
        {
            return this._data.media$description.$t;
        }// end function

        public function get mediaPlayerUri() : String
        {
            return this._data.media$player[0].url;
        }// end function

    }
}
